/*
 * @Author: 
 * @Date: 2025-09-17 10:48:50
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2025-09-22 16:30:09
 * @Description: 
 */
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [


    {
      path: '/',
      name: 'index',
      component: () => import('../views/home.vue'),
    },
    {
      path: '/management',
      name: 'management',
      redirect: '/management/staffManage',
      component: () => import('../views/management/index.vue'),
      children: [{
        path: 'staffManage',
        name: 'staffManage',
        component: () => import('../views/management/staff/staffManage.vue'),
      },
      {
        path: 'taskManage',
        name: 'taskManage',
        component: () => import('../views/management/task/taskManage.vue'),
      }
      ]
    },
    {
      path: '/service',
      name: 'service',
      redirect: '/service/myTask',
      component: () => import('../views/service/index.vue'),
      children: [{
        path: 'myTask',
        name: 'myTask',
        component: () => import('../views/service/myTask/mytask.vue'),
      },
      {
        path: 'TaskList',
        name: 'TaskList',
        component: () => import('../views/service/serviceTask/TaskList.vue'),
      }
      ]
    },
    {
      path: '/publish',
      name: 'publish',
      redirect: '/publish/mytask',
      component: () => import('../views/publish/index.vue'),
      children: [{
        path: 'mytask',
        name: 'mytask',
        component: () => import('../views/publish/mytask/mytask.vue'),
      },
      {
        path: 'publishTask',
        name: 'publishTask',
        component: () => import('../views/publish/publishTask/publishTask.vue'),
      }
      ]
    },
  ],
})

export default router
